<template>
    <div id="app">
        <div class="top-bar">
            <a>欢迎来到天津滨海国际机场</a>
        </div>
        <el-header>
            <div class="navbar">
                <el-menu
                    mode="horizontal"
                    :default-active="activeIndex"
                    background-color="#333"
                    text-color="#fff"
                    active-text-color="#ffd04b"
                >
                    <el-menu-item index="1">首页</el-menu-item>
<!--                    <el-menu-item index="2">航班信息</el-menu-item>-->
<!--                    <el-menu-item index="3">客机指南</el-menu-item>-->
<!--                    <el-menu-item index="4">服务设施</el-menu-item>-->
                    <el-menu-item index="5" class="login-item">
                        <router-link to="/login">登录</router-link>
                    </el-menu-item>
                </el-menu>
            </div>
        </el-header>
        <el-main>
            <div class="welcome-section">
                <img src="@/assets/imgs/air.png" alt="Airport" class="background-img" />
                <div class="welcome-text">
                    <h1>Welcome to Tianjin Binhai International Airport</h1>
                    <p>Have a great trip</p>
                </div>
            </div>
            <h2 style="margin-right: 1200px;">特色功能</h2>
            <div class="services-section">
                <el-row :gutter="20">   
                    <el-col :span="8">
                        <el-card class="service-card">
                            <h3>在线登记</h3>
                            <p>方便快捷的在线登记服务，减少您的候机时间。</p>
                        </el-card>
                    </el-col>
                    <el-col :span="8">
                        <el-card class="service-card">
                            <h3>航班追踪</h3>
                            <p>实时更新的航班信息，让您随时掌握航班动态。</p>
                        </el-card>
                    </el-col>
                    <el-col :span="8">
                        <el-card class="service-card">
                            <h3>机场导航</h3>
                            <p>帮助您快速找到机场各项服务设施。</p>
                        </el-card>
                    </el-col>
                </el-row>
            </div>
          <bottom></bottom>
        </el-main>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import 'element-plus/dist/index.css';
import Bottom from '@/components/Bottom.vue';

const activeIndex = ref('1');
</script>

<style scoped>
#app {
    text-align: center;
    margin: 0;
    padding: 0;
    
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.top-bar {
    background-color: black;
    color: azure;
    padding: 10px 0;
    width: 100%;
}

.navbar {
    display: flex;
    align-items: center;
    background-color: #333;
    width: 100%;
    padding: 0;
}

.el-menu {
    flex: 1;
    width: 100%;
}

.el-menu-item {
    color: white;
}

.welcome-section {
    position: relative;
    height: 400px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.background-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 1;
}

.welcome-text {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.welcome-text h1 {
    font-size: 3em;
    margin: 0;
}

.welcome-text p {
    font-size: 1.5em;
    margin: 0;
}

.services-section {
    padding: 50px 20px;
    background-color: #f5f5f5;
    width: 100%;
    box-sizing: border-box;
}

.service-card {
    text-align: left;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 1em;
    color: #666;
}
</style>
